/*
 * $Id: CategoryPlanningItem.java 1165 2011-07-13 02:46:14Z jyang $
 * 
 * Copyright (c) 2001-2008 Accentrix Company Limited. All Rights Reserved.
 * 
 * Accentrix Company Limited. ("Accentrix") retains copyright on all text, source
 * and binary code contained in this software and documentation. Accentrix grants
 * Licensee a limited license to use this software, provided that this copyright
 * notice and license appear on all copies of the software. The software source
 * code is provided for reference purposes only and may not be copied, modified 
 * or distributed.
 * 
 * THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS," WITHOUT ANY WARRANTY OF
 * ANY KIND UNLESS A SEPARATE WARRANTIES IS PURCHASED FROM ACCENTRIX AND REMAINS
 * VALID.  ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. ACCENTRIX SHALL NOT BE LIABLE
 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING OR MODIFYING THE
 * SOFTWARE OR ITS DERIVATIVES.
 * 
 * IN NO EVENT WILL ACCENTRIX BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
 * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
 * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE
 * USE OF OR INABILITY TO USE SOFTWARE, EVEN IF ACCENTRIX HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 */
package com.lightsaber.trade.cloth.entity.planning;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.lightsaber.trade.core.entity.BaseEntity;
import com.lightsaber.trade.cloth.entity.category.CategoryLeaf;

@Entity
@Table(name = "MHPP_CATEGORY_PLANNING_ITEM")
public class CategoryPlanningItem extends BaseEntity {

    private static final long serialVersionUID = 7757351378580792383L;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "LEVEL_1_PLANNING_ID", updatable = false)
    private Level1Planning level1Planning;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CATEGORY_LEAF_ID", updatable = false)
    private CategoryLeaf categoryLeaf;

    @Column(name = "CONVERT_RATE", nullable = true)
    private Float convertRate;

    @Column(name = "PLAN_YEAR", nullable = false)
    private Integer planYear;

    @Column(name = "PLANNED_PLACES", nullable = false)
    private Integer plannedPlaces;

    @Column(name = "PLANED_TRAINING_HOURS", nullable = false)
    private Integer planedTrainingHours;

    @Column(name = "ACTUAL_ENROLMENT", nullable = false)
    private Integer actualEnrolment;

    public Integer getPlannedPlaces() {
        return plannedPlaces;
    }

    public void setPlannedPlaces(final Integer plannedPlaces) {
        this.plannedPlaces = plannedPlaces;
    }

    public Integer getPlanedTrainingHours() {
        return planedTrainingHours;
    }

    public void setPlanedTrainingHours(final Integer planedTrainingHours) {
        this.planedTrainingHours = planedTrainingHours;
    }

    public Integer getActualEnrolment() {
        return actualEnrolment;
    }

    public void setActualEnrolment(final Integer actualEnrolment) {
        this.actualEnrolment = actualEnrolment;
    }

    public Level1Planning getLevel1Planning() {
        return level1Planning;
    }

    public void setLevel1Planning(final Level1Planning level1Planning) {
        this.level1Planning = level1Planning;
    }

    public Integer getPlanYear() {
        return planYear;
    }

    public void setPlanYear(final Integer planYear) {
        this.planYear = planYear;
    }

    public CategoryLeaf getCategoryLeaf() {
        return categoryLeaf;
    }

    public void setCategoryLeaf(final CategoryLeaf categoryLeaf) {
        this.categoryLeaf = categoryLeaf;
    }

    public Float getConvertRate() {
        return convertRate;
    }

    public void setConvertRate(final Float convertRate) {
        this.convertRate = convertRate;
    }
}
